This allows each include to perform an action a single time but doesn't
run it on each poll (instead running it once per page load). The
function receives all data loaded via the `load` function.
Signed-off-by: Paul Spooren <[email protected]>
else if (includes[i].content != null)
content = includes[i].content;
+ if (typeof (includes[i].oneshot) == 'function') {
+ includes[i].oneshot(results ? results[i] : null);
+ includes[i].oneshot = null;
+ }
+
if (content != null) {
containers[i].parentNode.style.display = '';
containers[i].parentNode.classList.add('fade-in');